import instance from "@/utils/request";
//获取所有资源信息
export const getallresources=(page,pageSize,userId,resourcesName,classesId)=>{
    const params = new URLSearchParams();
    params.set("page",page);
    params.set("pageSize",pageSize);
    params.set("resourcesName",resourcesName);
    params.set("classesId",classesId);
    params.set("id",userId);
    return instance.get("/resources",{params:params});
}
//删除资源
export const deleteresource=(id)=>{
    return instance.delete("/resources/"+id);
}
//编辑资源
export const updateresources=(resources)=>{
    return instance.put("/resources",resources);
}
//新增资源
export const AddResources=(resources)=>{
    return instance.post("/resources",resources);
}